package com.ayanami.departmentservice.service.impl;

import com.ayanami.departmentservice.entity.TbDepartment;
import com.ayanami.departmentservice.mapper.TbDepartmentMapper;
import com.ayanami.departmentservice.service.TbDepartmentService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ayanami
 * @since 2020-07-28
 */
@Service
public class TbDepartmentServiceImpl extends ServiceImpl<TbDepartmentMapper, TbDepartment> implements TbDepartmentService {

    @Override
    public List<TbDepartment> findDeptAndCount() {
        return this.baseMapper.findDeptAndCount();
    }

    @Override
    public IPage<TbDepartment> findDept(Page<TbDepartment> page, QueryWrapper<TbDepartment> queryWrapper) {
        return this.baseMapper.findDept(page,queryWrapper);
    }
}
